package com.shengqin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 班级信息
 * </p>
 *
 * @author Rui.Zhou
 * @since 2023-12-05
 */
@TableName("t_classes")
@Schema(name = "Classes对象", description = "班级信息")
@Data
public class Classes implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "班级名称")
    private String name;

    @Schema(description = "班级编码")
    private String code;

    @Schema(description = "所属学校")
    private Integer schoolId;

    @Schema(description = "所属年级")
    private Integer gradeId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(exist = false)
    private long studentCount = 0;
    @TableField(exist = false)
    private long studentMaleCount = 0;
    @TableField(exist = false)
    private long studentFemaleCount = 0;
}
